<!DOCTYPE html>
<html lang="ch">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script src="../sourceData/jquery-2.1.4/jquery.min.js"></script>
</head>

<body>
    <h3 id="h3" >空text <p>asfasdf</p>
</h3>
    <button id="b2">点击更改内容</button>
    <button id="b1">点击显示内容</button>
    <script>
        $('#b1').click(function () {
            /* 插值表达式${} */
            console.log(`.text():  ${$("#h3").text()}`);
            console.log(`.html():  ${$("#h3").html()}`);
        })
        $('#b2').click(function(){
            $('#h3').text("更换的内容")
            $('#h3').attr({
                "style":"color:red;font-size:500px"
                })
                
        })
        var h3=$("#h3")
        console.log(h3.attr("id"));
        
    </script>
  
</body>

</html>